use serde::{Deserialize, Serialize};
pub mod db;
#[derive(Deserialize, Serialize, PartialEq, Debug)]
pub struct ApiResult<T> {
    pub code: i32,
    pub message: Option<String>,
    pub data: Option<T>,
}
pub const API_SUCCESS: i32 = 20000;
pub const API_ERROR: i32 = 40000;
pub const ERROR_BAD_AUTH: i32 = API_ERROR + 1;
pub const ERROR_BAD_TOKEN: i32 = API_ERROR + 2;
pub const ERROR_BAD_PARAMS: i32 = API_ERROR + 3;
pub const ERROR_NOT_FOUND: i32 = API_ERROR + 4;
